/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.javanile.lara;

import org.javanile.chesslang.*;
/**
 *
 * @author cicciodarkast
 */
public class Lara {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Console c = new Console();
        Game    g = new Game();
        Brain   b = new Brain(c);
        do {
            // draw screen
            c.clear("Game 1");
            c.print(Less.game(g));
            
            c.line("Controls");
            c.table(new String[] {
                "(N) New game", "(Q) Quit",
                ""
            });
            c.line("Input");

            // prompt input
            String i = c.input();
            if (false) {
            } else if (c.isMove()) {
                g.domove(Less.move(i));
            } else if (c.is("n")) {
                g.newGame();
            } else if (c.is("q")) {
                c.clear();
                c.quit();
            }
        } while (!c.is("quit"));
    }
}
